/*
package com.example.userconsumer.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

*/
/**
 * @author likaiping
 * @createTime 2024/7/2 20:25
 *//*

@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**")
                .allowedOrigins("http://localhost:5173/")
                .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS","UPDATE")
                .allowedHeaders("*")
                .exposedHeaders("Access-Control-Allow-Origin") // 显式设置暴露的头部信息
                .allowCredentials(true); // 允许携带凭据信息
    }
}
*/
